home *** CD-ROM | disk | FTP | other *** search
/ Family Forum 262 / SOMC Family Forum 262.iso / Xtras / Widget Wizard / Widget Wizard.dir / Internal_49_Go to Marker.ls < prev    next >
Encoding:
Text File  |  1997-05-10  |  2.0 KB  |  74 lines

  1. property whichevent, whichLabel, playmode
  2.  
  3. on triggerGotoMarker me
  4.   trigger(me)
  5. end
  6.  
  7. on mouseUp me
  8.   if whichevent = #mouseUp then
  9.     trigger(me)
  10.   end if
  11. end
  12.  
  13. on mouseDown me
  14.   if whichevent = #mouseDown then
  15.     trigger(me)
  16.   end if
  17. end
  18.  
  19. on prepareFrame me
  20.   if whichevent = #prepareFrame then
  21.     trigger(me)
  22.   end if
  23. end
  24.  
  25. on enterFrame me
  26.   if whichevent = #enterFrame then
  27.     trigger(me)
  28.   end if
  29. end
  30.  
  31. on exitFrame me
  32.   if whichevent = #exitFrame then
  33.     trigger(me)
  34.   end if
  35. end
  36.  
  37. on trigger me
  38.   if the playmode of me = "Go to" then
  39.     case whichLabel of
  40.       #previous:
  41.         go(marker(-1))
  42.       #loop:
  43.         go(marker(0))
  44.       #next:
  45.         go(marker(1))
  46.       otherwise:
  47.         go(whichLabel)
  48.     end case
  49.   else
  50.     case whichLabel of
  51.       #previous:
  52.         play frame marker(-1)
  53.       #loop:
  54.         play frame marker(0)
  55.       #next:
  56.         play frame marker(1)
  57.       otherwise:
  58.         play frame whichLabel
  59.     end case
  60.   end if
  61. end
  62.  
  63. on getPropertyDescriptionList
  64.   set description to [:]
  65.   addProp(description, #whichLabel, [#comment: "Destination Marker:", #format: #marker, #default: "#Loop"])
  66.   addProp(description, #whichevent, [#comment: "Triggering Event:", #format: #symbol, #range: [#mouseUp, #mouseDown, #prepareFrame, #enterFrame, #exitFrame], #default: #mouseUp])
  67.   addProp(description, #playmode, [#comment: "Play Mode:", #format: #symbol, #range: ["Go to", "Play and Return"], #default: "Go to"])
  68.   return description
  69. end
  70.  
  71. on getBehaviorDescription
  72.   return "Go to a designated Marker when the specified Event occurs." && RETURN & "PARAMETERS:" && RETURN & "ΓÇó Destination Marker - choose from a list of marker names in the current movie or navigate relative to the current frame using the relative marker names Previous, Loop (Current), or Next." && RETURN & "ΓÇó Triggering Event - the event that should initiate navigation." & RETURN & "ΓÇó Play Mode - specifies control flow when requested movie is completed.  Play and Return will continue with the previous movie at the point where it left off.  Go To will never return."
  73. end
  74.